<html lang="zh-CN" xmlns:th="http://www.thymeleaf.org">
<section th:class="|tab-pane fade ${result.data.member==null?null:'show active'}|" id="modify" role="tabpanel" >
    <form th:action="@{/admin/member/save}"
          method="post"
          enctype="multipart/form-data"
          th:object="${result.data}">

        <div class="d-none">
            <label for="memberId">Id</label>
            <input id="memberId" type="text" th:value="*{member!=null?member.memberId:null}">
        </div>

        <div class="form-group">
            <label for="modifyMemberName">姓名</label>
            <input th:value="*{member!=null?member.memberName:null}"
                   id="modifyMemberName"
                   class="form-control"
                   name="memberName"
                   type="text"
                   placeholder="请输入姓名..."/>
        </div>

        <div class="form-group">
            <label for="modifyMemberStudentNum">学号</label>
            <input th:value="*{member!=null?member.memberStudentNum:null}"
                   id="modifyMemberStudentNum"
                   class="form-control"
                   name="memberStudentNum"
                   type="text" placeholder="请输入学号..."/>
        </div>

        <label for="modifyMemberPicture"> 请选择图片</label>
        <div class="input-group mb-3">
            <div class="custom-file">
                <input th:value="*{member!=null?member.memberPicture:null}"
                       type="file" class="custom-file-input" id="modifyMemberPicture" name="memberPicture">
                <label class="custom-file-label" for="modifyMemberPicture">Choose file</label>
            </div>
        </div>

        <div class="form-group">
            <label for="modifyMemberIntroduce">介绍</label>
            <textarea th:text="*{member!=null?member.memberIntroduce:null}"
                      id="modifyMemberIntroduce" class="form-control"
                      name="addMMemberIntroduce" type="text" placeholder="请输入介绍..."></textarea>
        </div>

        <div class="form-group">
            <label for="modifyMemberCategoryId">职位</label>
            <select th:value="*{member!=null?member.memberId:null}"
                    id="modifyMemberCategoryId"
                    class="form-control"
                    name="memberCategoryId"
                    type="text" >
                <option th:each="category,categoryState:*{memberCategoryList}"
                        th:selected="*{(member!=null?member.memberCategoryId:null)} eq ${category.memberCategoryId}"
                        th:value="${category.memberCategoryId}"
                        th:text="${category.memberCategoryName}"></option>
            </select>
        </div>
        <div>

        </div>

        <div class="form-group">
            <label for="modifyMemberMajor">专业</label>
            <input th:value="*{member!=null?member.memberMajor:null}"
                   id="modifyMemberMajor" class="form-control"
                   name="memberMajor" type="text" placeholder="请输入专业...">
        </div>

        <div class="form-group">
            <label for="modifyMemberGrade">年级</label>
            <input th:value="*{member!=null?member.memberGrade:null}"
                   id="modifyMemberGrade" class="form-control"
                   name="memberGrade" type="text" placeholder="请输入专业...">
        </div>

        <button type="submit" class="mb-5 btn btn-outline-success">保存</button>

    </form>
</section>
</html>